﻿@using Smartstore.Web.Models.Cart;

@model WishlistEmailAFriendModel

@{
    Assets.AppendTitleParts(T("PageTitle.WishlistEmailAFriend").Value);
    Assets.AddMetaRobots();
}

<div class="page email-a-friend-page">
    <div class="page-title">
        <h1 id="email-a-friend-title">@T("Wishlist.EmailAFriend.Title")</h1>
    </div>
    <div class="page-body">
        @if (Model.SuccessfullySent)
        {
            <div class="alert alert-success" role="alert">
                @Model.Result
            </div>
        }
        else
        {
            <form asp-action="EmailWishlist" asp-controller="ShoppingCart" method="post" class="form-horizontal" aria-labelledby="email-a-friend-title">
                <fieldset>
                    <div asp-validation-summary="ModelOnly" class="message-error"></div>

                    <div class="form-group">
                        <label asp-for="FriendEmail" class="col-form-label required"></label>
                        <input asp-for="FriendEmail" 
                               sm-required="true"
                               autocomplete="email"
                               class="friend-email form-control" 
                               placeholder="@T("Wishlist.EmailAFriend.FriendEmail.Hint")" />
                        <span asp-validation-for="FriendEmail"></span>
                    </div>

                    <div class="form-group">
                        <label asp-for="YourEmailAddress" class="col-form-label required"></label>
                        <input asp-for="YourEmailAddress" 
                               sm-required="true"
                               autocomplete="email"
                               class="your-email form-control" 
                               placeholder="@T("Wishlist.EmailAFriend.YourEmailAddress.Hint")" />
                        <span asp-validation-for="YourEmailAddress"></span>
                    </div>

                    <div class="form-group">
                        <label asp-for="PersonalMessage" class="col-form-label"></label>
                        <textarea asp-for="PersonalMessage" placeholder="@T("Wishlist.EmailAFriend.PersonalMessage.Hint")" class="personal-message form-control"></textarea>
                        <span asp-validation-for="PersonalMessage"></span>
                    </div>

                    <div class="form-group row">
                        <div class="col-12 text-muted">
                            @T("Common.FormFields.Required.Hint")
                        </div>
                    </div>

                    <zone name="gdpr_consent" />

                    <captcha sm-target="ShareWishlist" class="form-group" />

                    <input type="hidden" name="send-email" value="send-email">

                    <div class="form-group">
                        <button type="submit" name="send-email" class="btn btn-primary send-email-a-friend-button">
                            <i class="fa fa-envelope" aria-hidden="true"></i>
                            <span>@T("Wishlist.EmailAFriend.Button")</span>
                        </button>
                    </div>
                </fieldset>
            </form>
        }
    </div>
</div>
